package com.hxg.common;

import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.util.List;

/**
 * layui需要一个 code = 0 的返回值
 * 返回值为data
 * 送一个
 */
@Data
public class LayuiPageInfo<T> extends PageInfo<T> {
    private Integer code = 0;
    private List<T> data;
    private Long count;

    public LayuiPageInfo(List<T> list) {
        super(list, 8);
        this.data = list;
        this.count = this.getTotal();
    }
}
